<?php /* Smarty version Smarty-3.1.13, created on 2013-08-13 03:08:21
         compiled from "/var/www/html/templates/en/customer/main.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1740755017520932a5cffed2-94928752%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '1355a2ac5723eb9133313aa360340c6f086c0c0f' => 
    array (
      0 => '/var/www/html/templates/en/customer/main.tpl',
      1 => 1376334490,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1740755017520932a5cffed2-94928752',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'action' => 0,
    'msg' => 0,
    'link_create' => 0,
    'categories' => 0,
    'category' => 0,
    'link_category' => 0,
    'paging' => 0,
    'total' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_520932a606b565_24822938',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_520932a606b565_24822938')) {function content_520932a606b565_24822938($_smarty_tpl) {?>
<script>
 function checkItem(task, action) 
 {
   frm = document.frmAdmin;
   total = frm.total.value;
   check = false;
   a = confirm('Do you want to delete?');
   if(a) {
     for(i = 1; i <= total; i++) {
       id = document.getElementById('cid' + i);
       if (id.checked) {
         check = true;
         break;
       }
     }
     
     if (!check) {
       alert('Please select item to delete!!!');
       return false;
     } 
     frm.action = action;
     frm.task.value = task;
     frm.submit();
   }
 }
 
 function deleteItem(id, action) 
 {
   frm = document.frmAdmin;
   total = frm.total.value;
   ob = document.getElementById(id);
   a = confirm('Do you want to delete?');
   if(a) {
	 ob.checked = true;	
     frm.action = action;
     frm.task.value = 'delete';
     frm.submit();
   }
 } 
 function checkAll(chkAll) 
 {
   frm = document.frmAdmin;
   total = frm.total.value;
	 if(chkAll.checked) {
		 for(i = 1; i <= total; i++) {
			 id = document.getElementById('cid' + i);
			 id.checked = true;
		 }
	 } else {
		 for(i = 1; i <= total; i++) {
			 id = document.getElementById('cid' + i);
			 id.checked = false;
		 }
		 
	 }
 } 
</script> 
<style>
form {
	margin: 0;
	padding: 0;
}
</style>
 
<!-- Content Area -->
<div class="dma-thumbnail">
    <div class="content">
	<form name="frmAdmin" action="<?php echo $_smarty_tpl->tpl_vars['action']->value;?>
" method="post">    
        <div class="header">
            <h1 class="page-title"></h1>
        </div>
    </div>
    <ul class="breadcrumb">
        <li><a href="#">Home</a> <span class="divider">/</span></li>
        <li class="active">Customer</li>
    </ul>
    <div class="container-fluid">
    	<?php if ($_smarty_tpl->tpl_vars['msg']->value){?>
        <div class="alert alert-success">
        <button class="close" data-dismiss="alert" type="button">×</button>
        <?php echo $_smarty_tpl->tpl_vars['msg']->value;?>

        </div>
        <?php }?>    
        <div class="row-fluid">
            <div class="btn-toolbar">
                <button class="btn btn-primary" type="button" onClick="window.location.href='<?php echo $_smarty_tpl->tpl_vars['link_create']->value;?>
'"><i class="icon-plus"></i> New Customer</button>
              <div class="btn-group">
              </div>
            </div> 
            <div class="well">
                <table class="table">
                  <thead>
                    <tr>
                      <th>#</th>
                      
                      <th>Contact Person</th>
                      <th>Company Name</th>
                      <th>Email</th>
                      <th>Mobile</th>
                      <th style="width: 26px;"></th>
                    </tr>
                  </thead>
                  <tbody>
                  
                <?php if ($_smarty_tpl->tpl_vars['categories']->value){?>  
                <?php  $_smarty_tpl->tpl_vars['category'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['category']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['categories']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['category']->key => $_smarty_tpl->tpl_vars['category']->value){
$_smarty_tpl->tpl_vars['category']->_loop = true;
?>
                    <tr >
                      <td><input type="checkbox" id="cid<?php echo $_smarty_tpl->tpl_vars['category']->value['idx'];?>
" name="cid[<?php echo $_smarty_tpl->tpl_vars['category']->value['id'];?>
]" value="<?php echo $_smarty_tpl->tpl_vars['category']->value['id'];?>
" title="Checkbox for row 1" /></td>
                      
                      <td><?php echo $_smarty_tpl->tpl_vars['category']->value['name'];?>
</td>
                      <td><?php echo $_smarty_tpl->tpl_vars['category']->value['company'];?>
</td>
                      <td><?php echo $_smarty_tpl->tpl_vars['category']->value['email'];?>
</td>
                      <td><?php echo $_smarty_tpl->tpl_vars['category']->value['phone'];?>
</td>
                      <td>
                          <a href="<?php echo $_smarty_tpl->tpl_vars['category']->value['link'];?>
"><i class="icon-pencil"></i></a>
                          <a href="#" role="button" data-toggle="modal" onClick="javascript:deleteItem('cid<?php echo $_smarty_tpl->tpl_vars['category']->value['idx'];?>
', '<?php echo $_smarty_tpl->tpl_vars['link_category']->value;?>
');"><i class="icon-remove"></i></a>
                      </td>                  
                    </tr>
                <?php } ?>               
                <?php }else{ ?>
                <?php }?>                  

                  </tbody>            
                </table>
            </div>
<?php echo $_smarty_tpl->tpl_vars['paging']->value;?>
           
        </div>
    </div>            
</div>

  <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['total']->value;?>
" name="total"  />
  <input type="hidden" value="" name="task"  />
</form>
  
  <!-- end of element-box -->
  
  <noscript>
  Warning! JavaScript must be enabled for proper operation of the Administrator backend.
  </noscript>
  <div class="clr"></div>
</div>
<!-- end of content --> 
<?php }} ?>